package com.coocaa.ops.admin.v1.auth.sys;

import com.coocaa.ops.admin.base.controller.MgrBaseController;
import com.coocaa.ops.admin.v1.auth.sys.model.query.SysLogLoginModel;
import com.coocaa.ops.admin.v1.auth.sys.service.impl.SysLogLoginServiceImpl;
import com.coocaa.ops.common.core.base.model.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author bijiahao
 * @date : 2019/3/27.
 * @description
 */
@RestController
@RequestMapping("/v1/sysLogLogin")
public class SysLogLoginController extends MgrBaseController {
    @Autowired
    private SysLogLoginServiceImpl sysLogLoginService;

    @RequestMapping(value = "/pageList",method = {RequestMethod.GET,RequestMethod.POST})
    public Object pageList(HttpServletRequest request, SysLogLoginModel model) {
        Map<String, Object> data = R.ok(sysLogLoginService.getPageResult(model));

        return render2Json(data);
    }
}
